package com.allo2o.common.VO;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by mclubing on 16-6-14.
 *
 * @author mclubing
 */
public class AgencyVO {
    private String agencyId;

    private String agencyName;

    private String companyName;

    private String companyAddress;

    private String contact;

    private String contactMobile;

    private String bizLicence;

    private String tax;

    private String organization;

    private String idcardFront;

    private String idcardBack;

    private String password;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtCreate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date gmtModify;

    private String agent;

    private BigDecimal alipayRate;

    private BigDecimal wechatRate;

    private String inviteCode;

    private BigDecimal d0;

    private BigDecimal t1;

    public String getAgencyId() {
        return agencyId;
    }

    public void setAgencyId(String agencyId) {
        this.agencyId = agencyId == null ? null : agencyId.trim();
    }

    public String getAgencyName() {
        return agencyName;
    }

    public void setAgencyName(String agencyName) {
        this.agencyName = agencyName == null ? null : agencyName.trim();
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress == null ? null : companyAddress.trim();
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact == null ? null : contact.trim();
    }

    public String getContactMobile() {
        return contactMobile;
    }

    public void setContactMobile(String contactMobile) {
        this.contactMobile = contactMobile == null ? null : contactMobile.trim();
    }

    public String getBizLicence() {
        return bizLicence;
    }

    public void setBizLicence(String bizLicence) {
        this.bizLicence = bizLicence == null ? null : bizLicence.trim();
    }

    public String getTax() {
        return tax;
    }

    public void setTax(String tax) {
        this.tax = tax == null ? null : tax.trim();
    }

    public String getOrganization() {
        return organization;
    }

    public void setOrganization(String organization) {
        this.organization = organization == null ? null : organization.trim();
    }

    public String getIdcardFront() {
        return idcardFront;
    }

    public void setIdcardFront(String idcardFront) {
        this.idcardFront = idcardFront == null ? null : idcardFront.trim();
    }

    public String getIdcardBack() {
        return idcardBack;
    }

    public void setIdcardBack(String idcardBack) {
        this.idcardBack = idcardBack == null ? null : idcardBack.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModify() {
        return gmtModify;
    }

    public void setGmtModify(Date gmtModify) {
        this.gmtModify = gmtModify;
    }

    public String getAgent() {
        return agent;
    }

    public void setAgent(String agent) {
        this.agent = agent == null ? null : agent.trim();
    }

    public BigDecimal getAlipayRate() {
        return alipayRate;
    }

    public void setAlipayRate(BigDecimal alipayRate) {
        this.alipayRate = alipayRate;
    }

    public BigDecimal getWechatRate() {
        return wechatRate;
    }

    public void setWechatRate(BigDecimal wechatRate) {
        this.wechatRate = wechatRate;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode == null ? null : inviteCode.trim();
    }

    public BigDecimal getD0() {
        return d0;
    }

    public void setD0(BigDecimal d0) {
        this.d0 = d0;
    }

    public BigDecimal getT1() {
        return t1;
    }

    public void setT1(BigDecimal t1) {
        this.t1 = t1;
    }

    @Override
    public String toString() {
        return "AgencyVO{" +
                "agencyId='" + agencyId + '\'' +
                ", agencyName='" + agencyName + '\'' +
                ", companyName='" + companyName + '\'' +
                ", companyAddress='" + companyAddress + '\'' +
                ", contact='" + contact + '\'' +
                ", contactMobile='" + contactMobile + '\'' +
                ", bizLicence='" + bizLicence + '\'' +
                ", tax='" + tax + '\'' +
                ", organization='" + organization + '\'' +
                ", idcardFront='" + idcardFront + '\'' +
                ", idcardBack='" + idcardBack + '\'' +
                ", password='" + password + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", gmtModify=" + gmtModify +
                ", agent='" + agent + '\'' +
                ", alipayRate=" + alipayRate +
                ", wechatRate=" + wechatRate +
                ", inviteCode='" + inviteCode + '\'' +
                ", d0=" + d0 +
                ", t1=" + t1 +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AgencyVO agencyVO = (AgencyVO) o;

        if (agencyId != null ? !agencyId.equals(agencyVO.agencyId) : agencyVO.agencyId != null) return false;
        if (agencyName != null ? !agencyName.equals(agencyVO.agencyName) : agencyVO.agencyName != null) return false;
        if (companyName != null ? !companyName.equals(agencyVO.companyName) : agencyVO.companyName != null)
            return false;
        if (companyAddress != null ? !companyAddress.equals(agencyVO.companyAddress) : agencyVO.companyAddress != null)
            return false;
        if (contact != null ? !contact.equals(agencyVO.contact) : agencyVO.contact != null) return false;
        if (contactMobile != null ? !contactMobile.equals(agencyVO.contactMobile) : agencyVO.contactMobile != null)
            return false;
        if (bizLicence != null ? !bizLicence.equals(agencyVO.bizLicence) : agencyVO.bizLicence != null) return false;
        if (tax != null ? !tax.equals(agencyVO.tax) : agencyVO.tax != null) return false;
        if (organization != null ? !organization.equals(agencyVO.organization) : agencyVO.organization != null)
            return false;
        if (idcardFront != null ? !idcardFront.equals(agencyVO.idcardFront) : agencyVO.idcardFront != null)
            return false;
        if (idcardBack != null ? !idcardBack.equals(agencyVO.idcardBack) : agencyVO.idcardBack != null) return false;
        if (password != null ? !password.equals(agencyVO.password) : agencyVO.password != null) return false;
        if (gmtCreate != null ? !gmtCreate.equals(agencyVO.gmtCreate) : agencyVO.gmtCreate != null) return false;
        if (gmtModify != null ? !gmtModify.equals(agencyVO.gmtModify) : agencyVO.gmtModify != null) return false;
        if (agent != null ? !agent.equals(agencyVO.agent) : agencyVO.agent != null) return false;
        if (alipayRate != null ? !alipayRate.equals(agencyVO.alipayRate) : agencyVO.alipayRate != null) return false;
        if (wechatRate != null ? !wechatRate.equals(agencyVO.wechatRate) : agencyVO.wechatRate != null) return false;
        if (inviteCode != null ? !inviteCode.equals(agencyVO.inviteCode) : agencyVO.inviteCode != null) return false;
        if (d0 != null ? !d0.equals(agencyVO.d0) : agencyVO.d0 != null) return false;
        return t1 != null ? t1.equals(agencyVO.t1) : agencyVO.t1 == null;

    }

    @Override
    public int hashCode() {
        int result = agencyId != null ? agencyId.hashCode() : 0;
        result = 31 * result + (agencyName != null ? agencyName.hashCode() : 0);
        result = 31 * result + (companyName != null ? companyName.hashCode() : 0);
        result = 31 * result + (companyAddress != null ? companyAddress.hashCode() : 0);
        result = 31 * result + (contact != null ? contact.hashCode() : 0);
        result = 31 * result + (contactMobile != null ? contactMobile.hashCode() : 0);
        result = 31 * result + (bizLicence != null ? bizLicence.hashCode() : 0);
        result = 31 * result + (tax != null ? tax.hashCode() : 0);
        result = 31 * result + (organization != null ? organization.hashCode() : 0);
        result = 31 * result + (idcardFront != null ? idcardFront.hashCode() : 0);
        result = 31 * result + (idcardBack != null ? idcardBack.hashCode() : 0);
        result = 31 * result + (password != null ? password.hashCode() : 0);
        result = 31 * result + (gmtCreate != null ? gmtCreate.hashCode() : 0);
        result = 31 * result + (gmtModify != null ? gmtModify.hashCode() : 0);
        result = 31 * result + (agent != null ? agent.hashCode() : 0);
        result = 31 * result + (alipayRate != null ? alipayRate.hashCode() : 0);
        result = 31 * result + (wechatRate != null ? wechatRate.hashCode() : 0);
        result = 31 * result + (inviteCode != null ? inviteCode.hashCode() : 0);
        result = 31 * result + (d0 != null ? d0.hashCode() : 0);
        result = 31 * result + (t1 != null ? t1.hashCode() : 0);
        return result;
    }
}